package com.woniuxy.carrental.controller;

import com.woniuxy.carrental.entity.Province;
import com.woniuxy.carrental.service.PriviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author author
 * @create 2021-10-10 13:20
 */

@RestController
public class ProvinceController {


    @Autowired
    PriviceService priviceService;


    @GetMapping("/getPrivice")
    public List<Province> getPrivice(){
        List<Province> provinces = priviceService.selectAllProvince();
        return provinces;
    }



}
